﻿using Core;
using Core.Domain.Directory;
using System.Collections.Generic;

namespace Services.Directory
{

    /// <summary>
    /// 城市服务接口
    /// </summary>
    public partial interface ICitysService
    {
        /// <summary>
        /// 删除城市
        /// </summary>
        /// <param name="city"></param>
        void DeleteCity(City city);

        /// <summary>
        /// 获取城市
        /// </summary>
        /// <param name="CityId"></param>
        /// <returns></returns>
        City GetCityById(int CityId);

        /// <summary>
        /// 根据省份获取城市ID
        /// </summary>
        /// <param name="StateId"></param>
        /// <returns></returns>
        IList<City> GetCityByStateId(int StateId);

        /// <summary>
        /// 获取所有城市
        /// </summary>
        /// <returns></returns>
        IPagedList<City> GetCities(string name = "", bool? hot = true, int pageIndex = 0, int pageSize = int.MaxValue);
        /// <summary>
        /// 热点城市
        /// </summary>
        /// <param name="hot"></param>
        /// <returns></returns>
        IList<City> GetHotCities(bool hot = true);
        /// <summary>
        /// 增加城市
        /// </summary>
        /// <param name="city"></param>
        void InsertCity(City city);

        /// <summary>
        /// 更新城市
        /// </summary>
        /// <param name="city"></param>
        void UpdateCity(City city);
    }
}
